import request from '@/utils/request'

export default {
  option(params) {
    const action = params.action
    const version = params.version
    delete params.action
    delete params.version
    let url = `/v1/${action}`
    if (version === 'new') {
      url = `/v1/${action}`
    }
    delete params.version
    return request({
      url: url,
      method: 'get',
      params: params.query
    })
  }
}
